//
//  GoldViewController.m
//  parent
//
//  Created by yanzhen on 15/7/19.
//  Copyright (c) 2015年 ci123. All rights reserved.
//
#import "RuleViewController.h"
#import "GoldViewController.h"
#import "Config.h"

@interface GoldViewController ()
@property (weak, nonatomic) IBOutlet UILabel *goldNum;
@property (weak, nonatomic) IBOutlet UILabel *goldDetail;

@end

@implementation GoldViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.navigationItem.title = @"智慧币";
    [self CustomBackButton];
    NSDictionary *info = [[Config Instance]getUInfo];
    _goldNum.text = [info objectForKey:@"gold"];
    NSUInteger gold = [[info objectForKey:@"gold"]integerValue];
    _goldDetail.text = [NSString stringWithFormat:@"您目前有%d个智慧币可以抵用%d元",gold,(gold/100)];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)rule:(id)sender {
    RuleViewController *rule = [[RuleViewController alloc]init];
    [self.navigationController pushViewController:rule animated:YES];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
